package com.example.scaletest;

import android.app.Application;

import com.example.mylibrary.scaleweihgt.LogUtil;
import com.tencent.mmkv.MMKV;


public class Config {

    public static String INNER_CODE = "inner_code";

    private static class Ext {
        private static Application app;

        public Ext() {
        }
    }

    public static Application app() {
        if (Ext.app == null) {
            LogUtil.e("请在application中初始化config");
            return null;
        }
        return Ext.app;
    }
    public static MMKV mmkv;
    /**
     * 调用框架初始化
     *
     * @param app 程序实例
     */
    public static void init(Application app) {
        if (Ext.app == null) {
            Ext.app = app;

        }

        if (mmkv==null) {
            mmkv = MMKV.mmkvWithID("j_sky_dp", MMKV.MULTI_PROCESS_MODE);
        }
    }
}
